<template>
  <div>
    <el-row :gutter="20">
      <el-col :span="8">
        <el-card shadow="always" style="height:155px;margin-bottom: 20px">
          <div class="user-info">
            <img :src="avatar" class="user-avator" alt />
            <div class="user-info-cont">
              <div class="user-info-name">{{ name }}</div>
            </div>
          </div>
        </el-card>
      </el-col>

    </el-row>
  </div>
</template>

<script>

export default {
  name: "Index",
  data() {
    return {
      name: '',
      avatar: ''
    }
  },
  methods: {

  },
  mounted() {
    this.avatar = this.$store.state.user.avatar
    this.name = sessionStorage.getItem('name')
  }
};
</script>

<style scoped lang="scss">
.user-info {
  display: flex;
  align-items: center;
  padding-bottom: 20px;
}

.user-avator {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: solid #cccccc;
}

.user-info-cont {
  padding-left: 100px;
  flex: 1;
  font-size: 14px;
  color: #999;
}

.user-info-cont div:first-child {
  font-size: 30px;
  color: #222;
}

.user-info-list {
  font-size: 14px;
  color: #999;
  line-height: 25px;
}

.user-info-list span {
  margin-left: 70px;
}
</style>

